<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org"
	  lang="zh-cn">
<head>
	<meta content="云之讯,云通讯,云通讯平台" name="keywords"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
	<title>短信云平台运营系统 - 品牌代理商订单详情</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
	<link th:href="@{/resources/css/bootstrap.min14ed.css?v=3.3.6}" rel="stylesheet">
	<link th:href="@{/resources/css/font-awesome.min93e3.css?v=4.4.0}" rel="stylesheet"><!-- jqgrid-->
	<link th:href="@{/resources/js/plugins/jqgrid/css/ui.jqgrid-bootstrap.css}" rel="stylesheet">
	<link th:href="@{/resources/css/animate.min.css}" rel="stylesheet">
	<link th:href="@{/resources/css/style.min862f.css?v=4.1.0}" rel="stylesheet">
	<link th:href="@{/resources/css/plugins/sweetalert/sweetalert.css}" rel="stylesheet">
	<style>
		/* Additional style to fix warning dialog position */
		#alertmod_table_list_2 {
			top: 900px !important;
		}
		.reduce{
			position: relative;
			display: inline-block;
			width: 20%;
			height: 100%;
			text-align: center;
			background-color: #f4f6f8;
			border: 1px solid #d1d7da;
			color: #ff2222;
			cursor: pointer;
		}
		.add{
			position: relative;
			display: inline-block;
			width: 20%;
			height: 100%;
			background-color: #f4f6f8;
			text-align: center;
			border: 1px solid #d1d7da;
			color: #ff2222;
			cursor: pointer;
		}
		.count{
			width: 50px;
			text-align: center;
		}
		.modal-content{
			user-select:none;
			border:none;
		}
		#gbox_table_list{
			user-select:none;
		}
	</style>
</head>
<body class="gray-bg"><div th:replace="stat :: statCode"></div>
<div class="wrapper wrapper-content  animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox ">
				<!-- 搜索条件 -->
					<div class="jqGrid_wrapper">
						<table id="table_list"></table>
						<div id="pager_list"></div>
					</div>
			</div>
            <input type="hidden" id="cliId" th:value="${clientId}">
			<input type="hidden" id="agent_type" th:value="${agent_type}">
		</div>
	</div>
</div>

<script th:src="@{/resources/js/jquery.min.js?v=2.1.4}"></script>
<script th:src="@{/resources/js/bootstrap.min.js?v=3.3.6}"></script>
<script th:src="@{/resources/js/content.min.js?v=1.0.0}"></script>
<script th:src="@{/resources/js/layer/layer.js}"></script>
<script th:src="@{/resources/js/plugins/layer/laydate/laydate.js}"></script>
<script th:src="@{/resources/js/plugins/peity/jquery.peity.min.js}"></script>
<script th:src="@{/resources/js/plugins/jqgrid/js/i18n/grid.locale-cn.js}"></script>
<script th:src="@{/resources/js/plugins/jqgrid/js/jquery.jqGrid.min.js}"></script>
<script th:src="@{/resources/js/date_format.min.js?v=1.0.0}"></script>
<script th:src="@{/resources/js/plugins/sweetalert/sweetalert.min.js}"></script>
<script th:src="@{/resources/js/common.js?v=1.0.0}"></script>
<script th:src="@{/resources/js/auth.js?v=1.0}"></script>
<script th:inline="javascript">
    var Obj = {};
    var detArr = [];
    Obj.purchaseList = [];
    var clientId = $("#cliId").val();
    Obj.clientId = clientId;
    $(document).ready(function () {
        $.jgrid.defaults.styleUI = "Bootstrap";
        var clientId = $("#cliId").val();
        var agent_type = $("#agent_type").val();

        $("#table_list").jqGrid({
            url:/*[[@{/accountInfo/client/orderRemainIN}]]*/'',
            mtype: 'POST',
            datatype: "json",
            postData: {
                clientid:clientId,
                agent_type:agent_type
            },
            jsonReader : {
                root:"entityList",
                page: "currentPage",
                total: "totalPage",
                records: "totalCount"
            },
            rownumbers:true,
            height: 'auto',
            autowidth: true,
            shrinkToFit: true,
            autoScroll: true,
            rowNum: 15,
            rowList: [5,10,15,20,30],
            colModel: [

                {label:"产品类型",name: "productType",align: "left",sortable:false,width:"80",formatter: "select", editoptions:{value:"0:行业;1:营销;2:国际;3:验证码;4:通知;7:USSD;8:闪信;9:挂机短信"}},
                {label:"运营商",name: "operatorCode",align: "left",sortable:false,width:"80",formatter: "select", editoptions:{value:"0:全网;1:移动;2:联通;3:电信;4:国际"}},
                {label:"区域",name: "areaCode",align: "left",sortable:false,width:"80",formatter: "select", editoptions:{value:"0:全国;1:国际;"}},
                {label:"单价",name: "unitPrice", align: "left",sortable:false,
                    formatter: function (cellvalue) {
                		if(cellvalue==null ||cellvalue ==""){
                		    return "-";
						}else {
                            return cellvalue + "元";
						}

                    }
                },
                {label:"到期时间",name: "endTime", align: "left",sortable:false,
                    formatter: function (cellvalue) {
                        return new Date(cellvalue).Format("yyyy-MM-dd");
                    }
                },
                {label:"剩余数量",name: "remainQuantity", align: "left",sortable:false,
                    formatter: function (cellvalue, options, rowObject) {
                        var productType = rowObject.productType;
						if(productType == 2){
                            return cellvalue.toFixed(4) + "元";
						}else{
                            return cellvalue + "条";
						}
                    }
				}
            ],
            pager: "#pager_list",
            viewrecords: true,
            hidegrid: false
        });



    });



</script>

</body>
</html>